package cn.com.callback;
import groovy.json.*;
import groovy.swing.impl.DefaultAction;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.RequestDispatcher;
import cn.com.elite.EliteBean;
import java.security.MessageDigest;
import java.sql.ResultSet;
import java.text.SimpleDateFormat;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.wisdge.dataservice.Result;
import java.util.Map;
import java.util.Date;
import java.util.HashMap;

import org.json.JSONObject;
import org.json.JSONArray;
import org.json.JSONException;

import cn.com.elite.Util;
import cn.com.kh.getProperty;
import cn.com.kh.KHUtil;

/**
 *
 * @Title: job_Counselor_hw
 * @Description: 华盛 服务顾问列表查询 job
 * @author: Chieh
 * @date 2021-08-03 11:43:00
 *
 */

public class job_Counselor_hw implements CallBackInvoke{
	private static final Log log=LogFactory.getLog(job_Counselor_hw.class);

	public void doCallBack(EliteBean eliteBean,String callBack,Map map,String body) {

		log.debug("-------------------------start job_Counselor_hw 开始调用-----------------");

		Map<String, String> headMap = new HashMap<String, String>();
		headMap.put("Content-Type", "application/json");
		//获取配置参数
		String sysurl = getProperty.get("crmurl");//配置本地接口地址

		//华盛 服务顾问列表查询
		String sysur0 = sysurl+"aipHSTCounselor";
		//每日清除已阅读的提醒内容
		String sysur2=sysurl+"apiHSTOutReminder";
		//银行子账号列表 枚举值同步
		String sysur3=sysurl+"aipHSTsubBankCardList";
		//调佣佣金串号列表 枚举值同步
		String sysur4=sysurl+"aipHSTCommissionList";
		//调网聊渠道 brand 数据更新 channel link 
		String sysur5=sysurl+"aipHSTchatRequestUp";
		
		//华盛 知识库排行榜更新--内部接口
		String urldz6 = sysurl+"apiHST_KM_ranking";
		//华盛 历史数据归档--内部接口
		String urldz7 = sysurl+"apiHST_Data_archiving";

		//Util.doHttpPostUseHead(sysur0,"{}","UTF-8",100000,0,headMap);	//服务顾问列表查询

		try {
			Util.doHttpPostUseHead(sysur2,"{}","UTF-8",100000,0,headMap);	//每日清除已阅读的提醒内容
		} catch (Exception e) {
			log.error("每日清除已阅读的提醒内容 接口处理异常" + e.getMessage());
		}

		//Util.doHttpPostUseHead(sysur3,"{}","UTF-8",100000,0,headMap);	//银行子账号列表 枚举值同步
		
		//Util.doHttpPostUseHead(sysur4,"{}","UTF-8",100000,0,headMap);	//调佣佣金串号列表 枚举值同步

		/*
		try {
			Util.doHttpPostUseHead(sysur5,"{}","UTF-8",100000,0,headMap);	//调网聊渠道 brand 数据更新 channel link
		} catch (Exception e) {
			log.error("调网聊渠道 brand 数据更新 channel link 接口处理异常" + e.getMessage());
		}
		 */

		try {
			Util.doHttpPostUseHead(urldz6,"{}","UTF-8",100000,0,headMap); //华盛 知识库排行榜更新--内部接口
		} catch (Exception e) {
			log.error("知识库排行榜更新 接口处理异常" + e.getMessage());
		}

		try {
			Util.doHttpPostUseHead(urldz7,"{}","UTF-8",100000,0,headMap); //华盛 历史数据归档--内部接口
		} catch (Exception e) {
			log.error("历史数据归档 接口处理异常" + e.getMessage());
		}
	}
}